package com.bf.electroplating.pojo.enums;

import lombok.Getter;

@Getter
public enum InspectionTaskStatusEnum {

    NO_START("0","未开始"),
    AWAIT("1", "待巡检"),
    ING("2", "巡检中"),
    ING_OVER("3", "巡检中(已超期)"),
    YET("4", "已巡检"),
    YET_OVER("5", "已巡检(已超期)"),
    OVER("6", "超期未巡检"),
    ;

    private final String code;
    private final String desc;

    private InspectionTaskStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (InspectionTaskStatusEnum item : InspectionTaskStatusEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }

}
